<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="CompiledFn,mathlib.expr.CompiledFn,prefixArray,env,eval,evalWithArray" name="keywords">
<title>mathlib.expr.CompiledFn</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'CompiledFn - API Documentation';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">flashgraph API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?mathlib/expr/CompiledFn.html&amp;mathlib/expr/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;CompiledFn</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class CompiledFn"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">mathlib.expr</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class CompiledFn</td>
</tr>
</table>
<p></p>
 Represents the executable results of a compiled expression. Use the 
 <code>eval</code> method to substitute values for independent variables
 and return the Number result.
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#env">env</a> : <a href="../expr/Environment.html">Environment</a>
<div class="summaryTableDescription"> The Environment used in compiling the expression.</div>
</td><td class="summaryTableOwnerCol">CompiledFn</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#prefixArray">prefixArray</a> : Array<div class="summaryTableDescription">
  The array representing a prefix traversal of the ParseTree for the 
  original expression.</div>
</td><td class="summaryTableOwnerCol">CompiledFn</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#CompiledFn()">CompiledFn</a>(_env:<a href="Environment.html">Environment</a>, _prefixArray:Array)</div>
<div class="summaryTableDescription">
  Creates a new instance of a CompiledFn.</div>
</td><td class="summaryTableOwnerCol">CompiledFn</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#eval()">eval</a>(... varVals):Number</div>
<div class="summaryTableDescription">
  Evaluates the expression with the given values for the independent
  variables.</div>
</td><td class="summaryTableOwnerCol">CompiledFn</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#evalWithArray()">evalWithArray</a>(varVals:Array):Number</div>
<div class="summaryTableDescription">
  Evaluates the expression with the given array of values for the
  independent variables.</div>
</td><td class="summaryTableOwnerCol">CompiledFn</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="env"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">env</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var env:<a href="../expr/Environment.html">Environment</a></code><p> The Environment used in compiling the expression. </p></div>
<a name="prefixArray"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">prefixArray</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var prefixArray:Array</code><p>
  The array representing a prefix traversal of the ParseTree for the 
  original expression. This is generated by the Compiler.
  </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="CompiledFn()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">CompiledFn</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function CompiledFn(_env:<a href="Environment.html">Environment</a>, _prefixArray:Array)</code><p>
  Creates a new instance of a CompiledFn.  End-users should never call
  this; use the methods of Compiler to create CompiledFns.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">_env</span>:<a href="Environment.html">Environment</a></code> &mdash; The Environment used in compiling the expression.
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">_prefixArray</span>:Array</code> &mdash; The array generated by doing a prefix traversal
   of the ParseTree for the original expression.
  </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../expr/Compiler.html#compile()" target="">mathlib.expr.Compiler.compile()</a>
</div>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="eval()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">eval</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function eval(... varVals):Number</code><p>
  Evaluates the expression with the given values for the independent
  variables.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code>... <span class="label">varVals</span></code> &mdash; The Number values to substitute for the independent
   variables. These are applied in order of their instantiation in the
   Environment. For instance, the call <code>eval(1, 2, 3)</code> on a
   CompiledFn with an Environment constructed by the call
   <code>Environment("x", "y", "z")</code> would result in
   <code>x = 1</code>, <code>y = 2</code>, and <code>z = 3</code>.
   Expressions with no independent variables may be evaluated by calling
   <code>eval()</code> with no arguments.
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code></td>
</tr>
</table>
<br>
<span class="label">Throws</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code></code> &mdash; <code>ArgumentError</code>: Received the wrong
   number of arguments.
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20"></td><td><code></code> &mdash; <code>SyntaxError</code>: There is an error in the
   <code>prefixArray</code>.
  </td>
</tr>
</table>
</div>
<a name="evalWithArray()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">evalWithArray</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function evalWithArray(varVals:Array):Number</code><p>
  Evaluates the expression with the given array of values for the
  independent variables. This method functions exactly like
  <code>eval</code> except it takes an array for the variable values
  rather than a list.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">varVals</span>:Array</code> &mdash; An array of Number values.
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code></td>
</tr>
</table>
<br>
<span class="label">Throws</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code></code> &mdash; <code>ArgumentError</code>: Received the wrong
   number of arguments.
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20"></td><td><code></code> &mdash; <code>SyntaxError</code>: There is an error in the
   <code>prefixArray</code>.
  </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
